import 'package:flutter/material.dart';
import 'index.dart';
import 'demo_function/router/page_router_sub1.dart';
import 'demo_function/router/page_router_sub2.dart';
import 'demo_function/router/page_router.dart';
import 'demo_components/datatable/datatable_paginated.dart';
import 'demo_components/datatable/datatable_demo.dart';
import 'demo_components/datatable/datatable_select_post.dart';
import 'demo_components/datatable/datatable_sort_post.dart';
import 'demo_components/button.dart';
import 'demo_components/font_text_style.dart';
import 'demo_components/image_icon.dart';
import 'demo_components/radio_checkbox.dart';
import 'demo_components/dialog.dart';
import 'demo_function/dio_demo.dart';
import 'widgets/scroll/parallax_scroll_view.dart';
import 'demo_other/datetime_page.dart';
import 'demo_function/datasharing/data_sharing.dart';
import 'demo_function/datasharing/data_sharing_sub1.dart';

var RoutePath = {
  "/":(context) => IndexPage(), //注册首页路由
  "page_router":(context) => PageRouter(title: 'Flutter Demo Home Page'), //注册首页路由
  "page_router_sub1":(context) => PageRouteSub1(),
  "page_router_sub2": (context){
      return PageRouteSub2(text: ModalRoute.of(context).settings.arguments);// 将传入的arguments参数指定给页面的text参数
    },
  "datatable_paginated":(context) => PaginatedDataTablePage(title: 'Flutter Demo Home Page'),
  "datatable_demo":(context) => DataTableDemo(),
  "datatable_select":(context) => DataTableSelect(),
  "datatable_sort":(context) => DataTableSortPost(),
  "button":(context) => ButtonPage(),
  "font_text_style":(context) => FontTextStylePage(),
  "image_icon":(context) => ImageIconPage(),
  "radio_checkbox":(context) => RadioCheckboxPage(),
  "dialog":(context) => DialogPage(),
  "dio_demo":(context) => DioPage(),
  "paralle":(context) => ParallelWidget(),
  "scroll_notification":(context) => ScrollNotificationWidget(),
  "scroll_controller":(context) => ScrollControllerWidget(),
  "datetime":(context) => DateTimePage(),
  "data_sharing":(context) => DataSharingPage(title: '数据共享'),
  "data_sharing_sub1":(context) => DataSharingSub1Page(title: '数据共享Sub1'),
};